function objectRemoveKeyValues () {
  return {};
}

/**
 * restrict specific keys with merge obj2 to obj1
 * @param {object} obj1 
 * @param {object} obj2 
 * @param {String[]} keys 
 */
function objectMerge (obj1, obj2, keys) {
  if (Object.prototype.toString.call(keys) == "[object, Array]" && keys.length > 0) {
    let temp_obj = {}
    keys.forEach(key => {
      temp_obj[key] = obj2[key];
    });

    return Object.assign({}, obj1, temp_obj);
  } else {
    return Object.assign({}, obj1, obj2);
  }
}

module.exports = { 
  objectRemoveKeyValues,
  objectMerge
};